const fs = require('fs')
const Router = require('koa-router')

const router = new Router() //带有api前缀的接口
fs.readdirSync(__dirname).forEach((item) => {
    if (item !== 'index.js') {
        const r = require(`./${item}`)
        router.use(r.routes())
    }
})
module.exports = router